<?php

$this->pageTitle=Yii::app()->name . ' - Frequências da Turma';

$this->breadcrumbs=array(
		'Turmas'=>array('turma/admin'),
		$turma->nome.''=>array('turma/view', 'id'=>$turma->id),
		'Frequencias',
);

?>

<div class="row">
<h3 align="center">Frequências da Turma</h3> <br/>

<?php 
$form = $this->beginWidget('CActiveForm', array(
		'id' => 'frequencia-form',
		'enableAjaxValidation' => false,
		'enableClientValidation' => true,
		'htmlOptions' => array('enctype' => 'multipart/form-data'),
));

$yearNow = date("Y");
$yearFrom = $yearNow - 20;
$yearTo = $yearNow + 10;
$arrYears = array();

foreach (range($yearFrom, $yearTo) as $number) {
	$arrYears[$number] = $number;
}

$arrYears = array_reverse($arrYears, true);
echo '<h5 align="center">';
echo '<b> Mês: </b>'. $form->dropDownList($model, 'data', Utils::$meses, array('empty' => '', 'class'=>'span2',));
echo '<b> Ano: </b>'. $form->dropDownList($model, 'resposta', $arrYears, array('empty' => '', 'class'=>'span1',));
echo '<span style="float: right; width: 150px;"><p align="center">';
$this->widget('zii.widgets.jui.CJuiButton', array(
		'buttonType' => 'submit',
		'name' => 'btnSubmit',
		'value' => '1',
		'caption' => ' Buscar ',
		'htmlOptions' => array('class' => 'ui-button-primary')));
echo "</p></span><br/><br/>";
echo '</h5>';
?>

</div>
<br/>
<?php 

$this->createTable($turma, $model, $form);


$this->endWidget();

?>